package Rangel.common.world.entity;
import rescuecore2.standard.entities.Building;
import rescuecore2.standard.entities.Road;
import rescuecore2.worldmodel.EntityID;

import java.util.List;

public class Entrance {//入口
    Road neighbour;//入口所属的道路
    List<Building> ownerBuildings;//使用该入口的建筑物（大概）
    EntityID id;//入口对应道路的id

    public Entrance(Road neighbour, List<Building> ownerBuildings) {
        this.neighbour = neighbour;
        this.ownerBuildings = ownerBuildings;
        this.id = neighbour.getID();
    }

    public Road getNeighbour() {
        return neighbour;
    }

    public List<Building> getBuildings() {
        return ownerBuildings;
    }

    public EntityID getID() {
        return neighbour.getID();
    }

    @Override
    public String toString() {
        return "Entrance[bd:" + ownerBuildings + " ,id:" + neighbour + "]";
    }
}
